home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TTTTeeeexxxxtttt::::::::PPPPaaaarrrrsssseeeeWWWWoooorrrrddddssss((((3333)))) TTTTeeeexxxxtttt::::::::PPPPaaaarrrrsssseeeeWWWWoooorrrrddddssss((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- Text::ParseWords - parse text into an array of tokens
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- use Text::ParseWords;
- @words = "ewords($delim, $keep, @lines);
- @words = &shellwords(@lines);
- @words = &old_shellwords(@lines);
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- &_q_u_o_t_e_w_o_r_d_s() accepts a delimiter (which can be a regular expression) and
- a list of lines and then breaks those lines up into a list of words
- ignoring delimiters that appear inside quotes.
-
- The $keep argument is a boolean flag. If true, the quotes are kept with
- each word, otherwise quotes are stripped in the splitting process. $keep
- also defines whether unprotected backslashes are retained.
-
- A &_s_h_e_l_l_w_o_r_d_s() replacement is included to demonstrate the new package.
- This version differs from the original in that it will _NOT_ default to
- using $_ if no arguments are given. I personally find the old behavior
- to be a mis-feature.
-
- &_q_u_o_t_e_w_o_r_d_s() works by simply jamming all of @lines into a single string
- in $_ and then pulling off words a bit at a time until $_ is exhausted.
-
- AAAAUUUUTTTTHHHHOOOORRRRSSSS
- Hal Pomeranz (pomeranz@netcom.com), 23 March 1994
-
- Basically an update and generalization of the old shellwords.pl. Much
- code shamelessly stolen from the old version (author unknown).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-